package mallshop.tongyi.com.adbhepler;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.PermissionChecker;

import android.content.pm.PermissionInfo;
import android.os.Bundle;
import android.widget.TextView;

import com.blankj.utilcode.util.NetworkUtils;
import com.blankj.utilcode.util.PermissionUtils;

import mallshop.tongyi.com.adbhepler.server.AndroidMicroServer;

public class MainActivity extends AppCompatActivity {

    private AndroidMicroServer microServer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        microServer = new AndroidMicroServer(8888);
        microServer.start();
        ((TextView) findViewById(R.id.tv)).setText("服务已开启:\nIP:"+ NetworkUtils.getIPAddress(true)+":8888");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        microServer.stop();
    }
}
